<?php 
$con = mysql_connect("localhost","root","");
if($con){
	$username=$_POST['user_name'];
	mysql_select_db("giasuket_qlhs",$con);
	$q="SELECT * 
		FROM  `tbl_thuphieu` 
		WHERE  `f_phone` =".$username."
		LIMIT 0 , 30;";
	$arr_user=mysql_fetch_row(mysql_query($q));
		if($arr_user) 
		{
			echo '<span class="error">Da ton tai...</span>';exit;
		}
		else
		{
			echo '<span class="success">Dong y.</span>';
		} 
}
?>